<template>
<div>
 <h1>当前count值:{{$store.state.count}}</h1>
 <button @click="sub()">-</button>
</div>
</template>

<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Sub",
  data(){
    return{

    }
  },
  methods:{
    sub(){
      this.$store.commit('sub');
    }
  }
}
</script>

<style scoped>

</style>